package com.college.domain;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="SEMESTER_MASTER")
public class Semester implements Serializable {

	private static final long serialVersionUID = 5924361831551833717L;
	
	private Integer semesterId;
	private String semesterName;
	private Batch batch;
	private String status;
	
	public Semester(){
		
	}
	
	

	public Semester(Integer semesterId, String semesterName, Batch batch,
			String status) {
		super();
		this.semesterId = semesterId;
		this.semesterName = semesterName;
		this.batch = batch;
		this.status = status;
	}



	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="SEMESTER_ID")
	public Integer getSemesterId() {
		return semesterId;
	}

	public void setSemesterId(Integer semesterId) {
		this.semesterId = semesterId;
	}
	
	@Column(name="SEMSETER_NAME")
	public String getSemesterName() {
		return semesterName;
	}

	public void setSemesterName(String semesterName) {
		this.semesterName = semesterName;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="BATCH_ID", referencedColumnName="BATCH_ID")
	public Batch getBatch() {
		return batch;
	}

	public void setBatch(Batch batch) {
		this.batch = batch;
	}
	@Column(name="STATUS")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	
	
	
	
}
